package com.suliu.practice.decorator;

public class Client {
	//装饰模式测试
	public static void main(String[] args) {
		//节点流
		Component component=new ConcreteComponent();
		//过滤流
		Component component1=new ConcreteDecorator1(component);
		//过滤流
		Component component2=new ConcreteDecorator2(component1);
		component2.doSomething();
		
		//Component component=new ConcreteDecorator2(new ConcreteDecorator1(new ConcreteComponent()));
		//component.doSomething();
	}
}
